<?php
/**
 * Pod
 *
 * @category Jdcloud
 * @package  DragonJd\Pod
 * @author   Jdcloud <jdcloud-api@jd.com>
 * @license  Apache-2.0 http://www.apache.org/licenses/LICENSE-2.0
 * @link     https://www.jdcloud.com/help/faq
 */

namespace DragonJd\Pod;

use DragonJd\JdCloudClient;
use DragonJd\Api\Service;
use DragonJd\Api\DocModel;
use DragonJd\Api\ApiProvider;
use DragonJd\PresignUrlMiddleware;

/**
 * Client used to interact with pod.
 *
 * @method \DragonJd\Result createConfigFile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createConfigFileAsync(array $args = [])
 * @method \DragonJd\Result describeConfigFile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeConfigFileAsync(array $args = [])
 * @method \DragonJd\Result deleteConfigFile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteConfigFileAsync(array $args = [])
 * @method \DragonJd\Result updateConfigFile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateConfigFileAsync(array $args = [])
 * @method \DragonJd\Result describeContainer(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeContainerAsync(array $args = [])
 * @method \DragonJd\Result attach(array $args = [])
 * @method \GuzzleHttp\Promise\Promise attachAsync(array $args = [])
 * @method \DragonJd\Result execCreate(array $args = [])
 * @method \GuzzleHttp\Promise\Promise execCreateAsync(array $args = [])
 * @method \DragonJd\Result execGetExitCode(array $args = [])
 * @method \GuzzleHttp\Promise\Promise execGetExitCodeAsync(array $args = [])
 * @method \DragonJd\Result execStart(array $args = [])
 * @method \GuzzleHttp\Promise\Promise execStartAsync(array $args = [])
 * @method \DragonJd\Result resizeTTY(array $args = [])
 * @method \GuzzleHttp\Promise\Promise resizeTTYAsync(array $args = [])
 * @method \DragonJd\Result describeInstanceTypes(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeInstanceTypesAsync(array $args = [])
 * @method \DragonJd\Result describePods(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describePodsAsync(array $args = [])
 * @method \DragonJd\Result createPods(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createPodsAsync(array $args = [])
 * @method \DragonJd\Result checkPodName(array $args = [])
 * @method \GuzzleHttp\Promise\Promise checkPodNameAsync(array $args = [])
 * @method \DragonJd\Result describePod(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describePodAsync(array $args = [])
 * @method \DragonJd\Result deletePod(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deletePodAsync(array $args = [])
 * @method \DragonJd\Result startPod(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startPodAsync(array $args = [])
 * @method \DragonJd\Result stopPod(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopPodAsync(array $args = [])
 * @method \DragonJd\Result modifyPodAttribute(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyPodAttributeAsync(array $args = [])
 * @method \DragonJd\Result associateElasticIp(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateElasticIpAsync(array $args = [])
 * @method \DragonJd\Result disassociateElasticIp(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateElasticIpAsync(array $args = [])
 * @method \DragonJd\Result getContainerLogs(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getContainerLogsAsync(array $args = [])
 * @method \DragonJd\Result rebuildPod(array $args = [])
 * @method \GuzzleHttp\Promise\Promise rebuildPodAsync(array $args = [])
 * @method \DragonJd\Result resizePod(array $args = [])
 * @method \GuzzleHttp\Promise\Promise resizePodAsync(array $args = [])
 * @method \DragonJd\Result describeQuota(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeQuotaAsync(array $args = [])
 * @method \DragonJd\Result describeSecrets(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeSecretsAsync(array $args = [])
 * @method \DragonJd\Result createSecret(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createSecretAsync(array $args = [])
 * @method \DragonJd\Result describeSecret(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeSecretAsync(array $args = [])
 * @method \DragonJd\Result deleteSecret(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteSecretAsync(array $args = [])
 */
class PodClient extends JdCloudClient
{
    public function __construct(array $args)
    {
        $args['with_resolved'] = function (array $args) {
            $this->getHandlerList()->appendInit(
                PresignUrlMiddleware::wrap(
                    $this,
                    $args['endpoint_provider'],
                    [
                        'operations' => [
                        ],
                        'service' => 'pod',
                        'presign_param' => 'PresignedUrl',
                    ]
                ),
                'pod'
            );
        };

        parent::__construct($args);
    }
}